package cn.aliang.cloud.hystrixorder.service;

import cn.aliang.cloud.service.entity.ResultCode;
import cn.aliang.cloud.service.entity.ResultMessage;
import org.springframework.stereotype.Component;

/**
 * @Author: chendongliang
 * @Date: 2020/7/21 10:18
 */

@Component
public class PaymentFallbackService implements PaymentFeignHystrixService{

    @Override
    public ResultMessage<Void> pay(String id) {
        return new ResultMessage<>(ResultCode.OK.getCode(),"远程接口正常，使用服务降级功能");
    }

    @Override
    public ResultMessage<Void> payForException(String id) {
        return new ResultMessage<>(ResultCode.OK.getCode(),"远程接口异常，使用服务降级功能");
    }
}
